const express = require("express");
const scoreController = require("../controller/scoreController");
const requireAuth = require("../middleware/requireAuth");
const router = express.Router({ mergeParams: true });

router
  .route("/")
  .post(requireAuth, scoreController.createScore)
  .get(requireAuth, scoreController.getAllScore);

router
  .route("/test/:testId")
  .get(requireAuth, scoreController.getScoreByTestId);

router.route("/group").get(requireAuth, scoreController.getScoreByGroup);

module.exports = router;
